package com.nl.controller.web.bean;

import com.nl.controller.common.util.NumUtil;
import com.nl.controller.web.util.SetBeanUtil;

public class SmsSendCompare {
    private String cityId;
    private String cityName;
    private String countyId;
    private String countyName;
    private String mgrId;
    private String mgrName;
    private String nowNumber;    //当月发送量
    private String lastMonthNumber;  //上月发送量
    private String lastYearMonthNumber; //去年当月发送量
    private String compareLastMonthNumber;   //环比   （当月-上月）/上月  *100%
    private String compareYearLastMonthNumber;  //同比 （当月-去年当月）/去年当月  *100%

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return SetBeanUtil.getCityName(this.cityId);
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getMgrId() {
        return mgrId;
    }

    public void setMgrId(String mgrId) {
        this.mgrId = mgrId;
    }

    public String getMgrName() {
        return mgrName;
    }

    public void setMgrName(String mgrName) {
        this.mgrName = mgrName;
    }

    public String getNowNumber() {
        return nowNumber;
    }

    public void setNowNumber(String nowNumber) {
        this.nowNumber = nowNumber;
    }

    public String getLastMonthNumber() {
        return lastMonthNumber;
    }

    public void setLastMonthNumber(String lastMonthNumber) {
        this.lastMonthNumber = lastMonthNumber;
    }

    public String getLastYearMonthNumber() {
        return lastYearMonthNumber;
    }

    public void setLastYearMonthNumber(String lastYearMonthNumber) {
        this.lastYearMonthNumber = lastYearMonthNumber;
    }
  //环比
    public String getCompareLastMonthNumber() {
        return NumUtil.getPercent(NumUtil.sub(Double.parseDouble(this.nowNumber), Double.parseDouble(this.lastMonthNumber)), Double.parseDouble(this.lastMonthNumber));
    }

    public void setCompareLastMonthNumber(String compareLastMonthNumber) {
        this.compareLastMonthNumber = compareLastMonthNumber;
    }
    //同比
    public String getCompareYearLastMonthNumber() {
        return NumUtil.getPercent(NumUtil.sub(Double.parseDouble(this.nowNumber), Double.parseDouble(this.lastYearMonthNumber)), Double.parseDouble(this.lastYearMonthNumber));
    }

    public void setCompareYearLastMonthNumber(String compareYearLastMonthNumber) {
        this.compareYearLastMonthNumber = compareYearLastMonthNumber;
    }

	public String getCountyId() {
		return countyId;
	}

	public void setCountyId(String countyId) {
		this.countyId = countyId;
	}

	public String getCountyName() {
		return countyName;
	}

	public void setCountyName(String countyName) {
		this.countyName = countyName;
	}
}
